﻿CREATE TABLE [dbo].[Quote] (
    [SecurityID] INT        NOT NULL,
    [DateTimeID] INT        NOT NULL,
    [StartValue] SMALLMONEY NULL,
    [EndValue]   SMALLMONEY NULL,
    [LowValue]   SMALLMONEY NULL,
    [HighValue]  SMALLMONEY NULL,
    [Volume]     BIGINT     NULL,
    CONSTRAINT [PK_Quote] PRIMARY KEY CLUSTERED ([SecurityID] ASC, [DateTimeID] ASC),
    CONSTRAINT [FK_Quote_DateTime] FOREIGN KEY ([DateTimeID]) REFERENCES [dbo].[DateTime] ([DateTimeID]),
    CONSTRAINT [FK_Quote_Security] FOREIGN KEY ([SecurityID]) REFERENCES [dbo].[Security] ([SecurityID])
);

